hacknetfandomcom-20200222-history
Forum:Modding Hacknet - Part 2 - Adding Security
Disclaimer DISCLAIMER: THERE IS NO OFFICIAL WAY TO MOD HACKNET AS OF NOW. THE MODDING YOU WILL BE DOING INVOLVES GOING INTO THE GAME'S FILES AND CHANGING THEM TO CREATE A MOD. PLEASE BACK-UP YOUR GAME IF YOU HAVE NOT DONE SO. What we're going to be doing Last time, we created a computer that we connected to using the IP 48.222.1.865, and saw "Hello World" Pop up on the screen. However, it was way too easy to take over and delete. In this tutorial, we're going to be covering how to secure our Computer in a much more difficult way, so it's harder for the player to hack. Our code Our code looked something like this: If you don't remember what all of it does, remember that the XML tag is telling us we're using XML version 1, the Computer tag is creating a new computer called "myfirstcomputer.com" which you can connect to at 48.222.1.865 in the game. The addWebServer tag is adding a webpage called HelloWorld.html, which will load up once you connect to the computer. Increasing Security The first thing to do with our code is ramp up our security within the Computer tag. We'll be doing this by changing it from security="0" to security="4" so that players will be traced if they hack into the computer. Let's go into the Computer tag, and change that now: Levels of Security There are different levels of security, and certain variables come into play once the security is increased. Let's look at this table for reference: Adding Ports Now that we have made it so that the user can be traced if they attempt to hack into the computer, We're going to make it so that they have to hack into at least two ports if they want to get into the computer. We're going to do this by adding some lines of code above our ' 80, 2, 21, 1433 So, what's the code above? The tag is adding the amount of ports that are on the computer. The ' 80, 22, 21, 1433 The proxy tag means that the user has to get past a proxy in order to hack the computer. The time attribute is saying that it will take a certain amount of time (25 seconds, in this case) to hack into the proxy. That should increase the difficulty. However, we want to increase it even more. Let's add a firewall. Adding a Firewall Adding is sort of like adding a proxy. Just above the proxy code, let's add: The firewall tag, means that we're adding a new firewall to the computer. The level attribute affects how long it will take before you get the solution by running the "analyze" command. The solution attribute is what you have to put in as a parameter for the "solve" command in order to remove the firewall. Increasing/Decreasing the Trace Time Now that we have our firewall, our proxy, and our ports, let's increase the trace time, so that it will be harder for people to get in: ' 80, 22, 21, 1433 The trace tag is telling Hacknet that we want to change the values of tracing the user. The time attribute is saying that the trace will take 60 seconds, or one minute. Adding the cherry on top - Creating an Admin Now, hacking into ports and taking down proxies and firewalls is a lot of work, especially if you don't have the proper tools, which is why there is a workaround for this: creating an admin. Let's dive into the code: ' ' ' 80, 22, 21, 1433 Let's explain the code. The admin tag is telling Hacknet that we're creating an admin for this computer. The type attribute is setting the type of admin. The resetPassword attribute means that when you logout, it will not require you to login again. The adminPass tag is telling Hacknet that we are changing the password for logging in to the system, and the pass attribute is where we set the password. In this case, the password is "adminsecure". Want to test this out? Save, login to Hacknet, create a new account, and connect to the ip. Go to login, for the username, type in "admin" and for the password, type in admin secure. The account tag is saying that we're creating a new account, whose username is MyFirstAdmin, and that the password is adminsecure. That way, you can bypass all of the security with the password. Type = 0 says that the user is the admin. The isSuper = "false" part means that means that if the admin is a fast type, it will reset the password instantly. Try logging out, and logging back in, and you'll see that the password has been reset. Admin Types So, you saw the "type" attribute in the admin tag. Well, there are a lot of settings for admins. Here's a table, and what they do: So wait a second, if both fast and basic admins reset the passwords, does that mean that resetPassword does nothing? The answer is: no. resetPassword changes it so that fast and basic can't reset the password when you log out. One more thing, if you just have: Then it will generate a new random password every time. Account Types You also saw the account type = "0". There are mulitple account types, each for different things: Final Steps The finished code In case you'll find it handy, here's the finished code that we've done: 80, 22, 21, 1433 Accessing your computer Connect to your computer's ip, in this case 48.222.1.865, and if you wish, you can break in. Since you've had to restart, there's no way you can crack all the ports though. Don't worry, there's a solution. Go into Content/Computers/BootLoadList.txt, and add the following at the end: #Cheats Content/AdventureNetwork/ExampleComputer2.xml Once you've added that, create a new game in Hacknet, and connect to the ip 167.194.132.8 and once you do that, head to the bin file. Inside is all of the required port hacking executables. Connect to your webserver, and try to crack into it. What you've learned Now you're all ready to go! You've learned how to add ports, proxies, firewalls, different levels of security, and how to add admins! Congratulations! What's next? In the next tutorial, we're going to look at eosDevices, linking computers together, and adding files to your computers. If you have any questions or concerns, please type them in the comments.